#1、线程查看
mpstat -P ALL 1
taskset -p 51354
ps -eo pid,args,psr | grep a.out

#2、线程结束
kill 35735
kill -9 35735
kill -9 -1  # 结束自己
#3、cpu信息
cat /proc/cpuinfo
# 查看物理CPU个数
cat /proc/cpuinfo|grep "physical id"|sort -u|wc -l
# 查看每个物理CPU中core的个数(即核数)
cat /proc/cpuinfo|grep "cpu cores"|uniq
# 查看逻辑CPU的个数
cat /proc/cpuinfo|grep "processor"|wc -l
# 查看CPU的名称型号
cat /proc/cpuinfo|grep "name"|cut -f2 -d:|uniq
#4、numa节点
sudo apt install numactl
numactl --hardware
numastat
cat /sys/devices/system/node/node0/cpulist
cat /sys/devices/system/node/node0/cpumap